<?php include 'product_list_css_js.php'; ?>
<table width="988" cellspacing="0" cellpadding="0" border="0" align="center">
            <tbody><tr>
                <td width="9" background="/public/images/them/t.jpg">&nbsp;</td>

                <td width="970">
                    <table width="970" cellspacing="0" cellpadding="0" border="0" align="center">

                        <tbody>
                            <?php include 'top_menu.php';?>
                        <tr>
                            <td width="970">
                                <table width="970" cellspacing="0" cellpadding="0" border="0" bgcolor="#FFFFFF">
                                    <tbody><tr>
                                        <td width="5" valign="top">&nbsp;</td>
                                        <td width="200" valign="top">
                                            <div style="font-size: 1px; height: 2px;"></div>
                                            <table width="200" cellspacing="0" cellpadding="0" border="0" align="center">
                                                <tbody>
                                                    <tr>
                                                    <td align="center" id="amdtrai"><span id="mdtrai">SẢN PHẨM</span></td>
                                                </tr>
                                            </tbody>
                                            </table>
<table width="200" cellspacing="0" cellpadding="0" border="0" align="center" id="bomenu">
              <tbody>
                  <?php foreach ($aryRootCategory as $key => $value) {?>
                    <tr>
                    <td width="20" align="right">
                        <img align="absmiddle" src="/public/images/them/cham.gif">
                    </td>
                    <td width="180" id="amenutrai">
                        <a id="menutrai" href="<?php echo $root_page;?>/danhmuc/<?php echo $value['category_id'];?>/<?php echo $value['category_name_filter'];?>.html"><?php echo $value['category_name'];?></a>
                    </td>
                    </tr>
                    <?php if(isset ($arySubcategory[$value['category_id']])){?>
                        <?php foreach ($arySubcategory[$value['category_id']]['sub_category'] as $key2 => $subCategory) {?>
                        <tr>
                            <td>&nbsp;</td>
                            <td id="amenutrai2">
                                <a id="menutrai2" class="<?php echo ($subCategory['category_id'] == $categoryId) ? 'selected' : '';?>" href="<?php $root_page;?>/danhmuc/<?php echo $subCategory['category_id'];?>/<?php echo $subCategory['category_name_filter'];?>.html">-&nbsp;<?php echo $subCategory['category_name'];?></a>
                            </td>
                        </tr>
                        <?php } ?>
                    <?php } ?>
                  <?php } ?>
</tbody>
</table>
                                            <div style="font-size: 1px; height: 10px;"></div>
                                            <?php include 'product_right_support.php';?>
                                        </td>
                                        <td width="3" valign="top">&nbsp;</td>
                                        <td width="100%" valign="top">

                                            <div style="font-size: 1px; height: 2px;"></div>
<table width="99%" cellspacing="2" cellpadding="2" border="0" align="center" id="bochinh">

  <tbody>
      <tr>
   <td id="asanpham" colspan="4">
       <span id="sanpham">
           <a  class='active' href="<?php echo $root_page;?>" title='Trang chủ'>Trang chủ</a><span> &gt; </span>
        <?php foreach ($categoryParent as $key => $value) {?>
            <?php if($key > 0){?>
                <span> &gt; </span>
            <?php } ?>
                <a href="/danhmuc/<?php echo $value['category_id'];?>/<?php echo $value['category_name_filter'];?>.html" title="<?php echo $value['category_name'];?>"><?php echo $value['category_name'];?></a>
        <?php } ?>
        </span>
   </td>
  </tr>
  <tr>
  <?php $i=1; foreach ($aryProduct as $key => $product) {?>
    <td width="33%" valign="top" align="center" id="bosanpham">
        <div style="min-height: 450px;">
            <table width="100%" cellspacing="3" cellpadding="3" border="0">
  <tbody>

  <tr>

    <td valign="top" height="66" align="center" colspan="2">
        <a id="tieude" href="<?php echo $root_page;?>/sanpham/<?php echo $product['product_id'];?>/<?php echo $product['product_title_filter']; ?>.html" title="<?php echo $product['product_title']; ?>" ><?php echo $product['product_title']; ?></a>
    </td>
  </tr>
    <tr>
        <td valign="middle" height="160" align="center" colspan="2">

	<a title="<?php echo $product['product_title']; ?>" href="<?php echo $root_page;?>/sanpham/<?php echo $product['product_id'];?>/<?php echo $product['product_title_filter']; ?>.html" class="thumbnail">
            <img border="0" title="<?php echo $product['product_title']; ?>" alt="<?php echo $product['product_title']; ?>" src="<?php echo $root_page . $product['product_main_image']; ?>">
            <span style="width: 350px;">
            <p style="text-align:center; font-weight:bold; color:#26A817; font-size:14px;">
                <?php echo $product['product_title']; ?>
            </p>
            <img title="<?php echo $product['product_title']; ?>" alt="<?php echo $product['product_title']; ?>" src="<?php echo $root_page . $product['product_large_image']; ?>">
        </span>
        </a>
        </td>
  </tr>

   <tr>

    <td valign="bottom" align="center" colspan="2">
        <strong>Giá: </strong> <span id="gia"><?php echo number_format($product['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ</span>
    </td>
  </tr>
    <tr>
  <td valign="top" align="center"> 
      <a id="tieude" title="<?php echo $product['product_title']; ?>" href="<?php echo $root_page;?>/sanpham/<?php echo $product['product_id'];?>/<?php echo $product['product_title_filter']; ?>.html"><img border="0" src="/public/images/them/chitiet.gif"></a>
  </td>
  <td valign="top" align="center"> 
      <?php if (in_array($product['product_id'], $aryOrderProductId)) { ?>
        <div>
            <a href="/order/chi-tiet-gio-hang.html" title="Xem giỏ hàng" style="color: red;">Đã có trong giỏ hàng</a>
        </div>
      <?php }else{?>
        <div id="product_order_<?php echo $product['product_id']; ?>">
          <a id="tieude">
          <img class="cpointer" border="0" src="/public/images/them/mua.gif" onclick="MyController.addProductToShopCat('<?php echo $product['product_id'];?>','<?php echo $product['product_category_id'];?>');">
      </a>
      </div>
      <?php }?>
      
  </td>
  </tr>
</tbody>
      </table>
        </div>
   </td>
   <?php if($i%3==0){?>
    </tr><tr>
   <?php }?>
<?php $i++;} ?>
  </tr>

<tr>
    <td align="right" colspan="4">
        <table cellspacing="2" cellpadding="2" border="0" align="right">
            <tbody>
                <tr>
                    <td><?php echo $strPaging;?></td>
                </tr>
            </tbody>
        </table>
    </td>
</tr>


</tbody></table>

</td>



<td width="180" valign="top">

    <div style="font-size: 1px; height: 2px;"></div>

</td>


<td width="5" valign="top">&nbsp;

</td>


</tr>
</tbody></table>
</td>
</tr>

<tr>
    <td valign="top" align="center">
        <?php include 'home_footer.php';?>
    </td>
</tr>


</tbody></table>
</td>
<td width="9" background="/public/images/them/p.jpg">&nbsp;</td>
</tr>
</tbody>
</table>
